package top.conangao.common.mybatisplus.handler;

import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler;
import net.sf.jsqlparser.expression.Expression;
import net.sf.jsqlparser.expression.LongValue;
import top.conangao.common.holder.UserContextHolder;

/**
 * @author ConanGao
 * @description
 * @since 2024/1/10 14:04
 **/
public class CustomTenantLineHandler implements TenantLineHandler {
    @Override
    public Expression getTenantId() {
        return new LongValue(UserContextHolder.get().getTenantId());
    }
}
